home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VI5.ARJ / VIDEMO.EXE / SAMPLE1.PRG < prev    next >
Text File  |  1992-01-21  |  790b  |  27 lines

  1. ************************************************************************
  2. * SAMPLE1.PRG                           Peter M. Freese
  3. * 1/20/92                               Pinnacle Publishing, Inc.
  4. *
  5. * Source code demonstration of Push Button class
  6. ************************************************************************
  7.  
  8. #include "vi.ch"
  9. #include "inkey.ch"
  10.  
  11. FUNCTION Sample1()
  12. LOCAL oWin,oPB
  13.   // create a window
  14.   oWin := VWindowNew(12,20,27,60,0,WS_DOUBLEBORDER+WS_TITLE,;
  15.     HIWHITE,GREEN,"Push Button Class")
  16.  
  17.   // create push button control
  18.   oPB := VPushButtonNew(oWin,K_ALT_B,4,10,8,30,0,BLACK,WHITE,;
  19.     "&Beep me")
  20.  
  21.   // assign an action to the push button
  22.   oPB:action := { || TONE(2000,5) }
  23.  
  24.   // return window object to calling routine
  25. RETURN oWin
  26.  
  27.